
import { constantRoutestwo } from '@/views/pagetwo/router'

const permission = {
  state: {
    routes: {},
    addRoutes: []
  },
  mutations: {
    SET_ROUTES: (state, routes) => {
      state.addRoutes = routes

      state.routes = constantRoutestwo
    }
  },
  actions: {
    GenerateRoutes({ commit }) {
      return new Promise(resolve => {
        commit('SET_ROUTES', constantRoutestwo)

        resolve()
      })
    }

  }
}

export default permission
